/*
 * dtranslator.h
 *
 *  Created on: 16.08.2009
 *      Author: index01d
 */

#ifndef DTRANSLATOR_H
#define DTRANSLATOR_H

#include <QtGui>
#include "ui_dtranslator.h"

/**
 * dTranslator
 * @desc: Creates and controls the input widget
 */
class dtranslator : public QWidget
{
    Q_OBJECT

public:
    dtranslator(QWidget *parent = 0);
    ~dtranslator();

public slots:
    //Is called when translate is ready
    void tReady(const QString& result);
    //Tray-click handler
    void needShow(QSystemTrayIcon::ActivationReason reason);

signals:
    void getTranslate(const QString&);

protected:
    virtual void keyPressEvent(QKeyEvent *event);

private:
    //Input UI
    Ui::dtranslatorClass ui;
};

#endif // DTRANSLATOR_H
